package com.bright.ghj.overt.repository.primary;

import com.bright.ghj.overt.pojo.po.primary.RightRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface RightRoleRepository extends JpaRepository<RightRole, Integer>, JpaSpecificationExecutor<RightRole> {

    @Query("from RightRole where pMain=:pMain and isDisplay=true")
    List<RightRole> findAllByPMain(@Param("pMain") Integer pMain);

}